<%@page import="org.apache.log4j.Logger"%>
<%@page import="com.mconnect.msurvey.model.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib prefix="s" uri="/struts-tags"%>
<%
// w celu poprawnie dzialajacej sesji:
response.setHeader("Cache-Control","no-store"); 
response.setHeader("Pragma","no-cache"); 
response.setDateHeader ("Expires", 0); 
%>      
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
	  <title>mSurvey</title>
	  <link rel="stylesheet" href="resources/css/ap.css">
	  <link rel="stylesheet" href="resources/css/detail_style.css">
	  <link rel="stylesheet" href="js/jQuery/demos.css">
	  <link rel="stylesheet" href="js/jQuery/themes/base/jquery.ui.all.css">
  </head>

<body>
<div id="top">
	<div class="sessionUser">
    	<div id="logoMconnect">
    		<img src="resources/images/top_logo.gif" width="84" height="59" alt="image001"/>
    	</div>
    	<div id="mConnect_txt">
        	mConnect<br/>al. Jana Pawła II 41c<br/>31-864 Kraków
       </div>
    	
      <% User user = (User) session.getAttribute("user");
      	
      	 %>
    </div>
    <img src="resources/images/kreska.png" class="kreska">
    <div class="header_txt">
      <p class="header_txt_1">mSurvey</p>
      <p class="header_txt_2">Ankiety</p>
    </div>
    
    <ul id=menu>
      
    <li><a href="index.jsp"> Start</a></li>
	
	<li style="float: right"><a href="login.jsp?id=logout">Wyloguj</a></li>
    </ul>
     <% Logger log = Logger.getLogger(request.getServletContext().getClass());
     	log.error("Nazwa wyjatku: " + request.getAttribute("exception"));
     	log.error("Opis: " + request.getAttribute("exceptionStack"));
     	System.out.println("Nazwa wyjatku: " + request.getAttribute("exception"));
   	 	System.out.println("Opis: " + request.getAttribute("exceptionStack"));
   	 	
    %>
    <div id=kategorie>
    <div class="ui-widget" style="width: 80%; margin-left: 10%;">
					<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
						<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
						<strong>Zapis ankiety nie powiód się!</strong> <br /><br />Podany numer resondenta istnieje w naszej bazie danych. </p>
					</div>
					
		</div>
    
    <center>
		    		<div style="width:100%; float: left; margin-top: 50px;">
				    	<div class="d_aBack" style="margin-left: 45%; margin-bottom: 10px; background-color: #1b3c4f;"  >
				    		<%if(session.getAttribute("admin") !=  null){ %>
				        		<div class="a"><a href="adminPanel.jsp" style="text-decoration: none; display: block; text-align: center; color: white; font-weight: bold;">Powrót</a></div>
				        	<%}else{ %>
				        		<div class="a"><a href="index.jsp" style="text-decoration: none; display: block; text-align: center; color: white; font-weight: bold;">Powrót</a></div>
				        	<%} %>
				        </div>
			        </div>
				</center>
    </div>
    
</div>
  </body>
</html>